// house_pkg/pages/room/index.ts
Page({
  data: {
    points: '',
    building: '',
    rooms: []
  },
  onLoad({ points, building }) {
    console.log(points, building);
    this.fake(points, building)
  },
  fake(points, building) {
    const size = Math.floor(Math.random() * 5) + 4
    const rooms = []
    for (let i = 0; i < size; i++) {
      const fooler = Math.floor(Math.random() * 19) + 1
      const No = Math.floor(Math.random() * 2) + 1
      const room = [fooler, 0, No].join('')
      if (rooms.includes(room)) return
      rooms.push(room)
    }
    this.setData({ points, building, rooms })
  }
})